const TokenKey = 'User-Token'

const storage=window.localStorage;
/**
 * 获取Token
 * @returns {string}
 */
export function getToken() {
    return storage.getItem(TokenKey)
}

/**
 * 设置Token
 * @param token token
 */
export function setToken(token) {
    return storage.setItem(TokenKey, token)
}

/**
 * 移除Token
 */
export function removeToken() {
    return storage.removeItem(TokenKey)
}

/**
 * 设置键值对
 * @param key 键
 * @param value 值
 */
export function setKeyValue(key, value) {
    return storage.setItem(key,value)
}

export function getValue(key){
    return storage.getItem(key) || ''
}

export function removeKey(key){
    return storage.removeItem(key)
}